home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / mathstud.zip / FLIPLR.M < prev    next >
Text File  |  1993-03-23  |  366b  |  19 lines

  1. function y = fliplr(x,nc)
  2. % y = fliplr(x,nc)
  3. % fliplr(x)        reverse the order of the argument columns
  4. % fliplr(x,nc)    reverse the order of the first nc columns
  5.  
  6. %       S.Halevy 7/31/92
  7. %       Copyright (c) 1992 by the MathWizards
  8.  
  9. y=x;
  10. [m,n] = size(y);
  11.  
  12. if nargin<2
  13.    nc=n;
  14. else
  15.    nc = abs(nc);
  16. end
  17. nc=expr_sel(nc>n,n,nc);
  18. y(:,nc:-1:1)=x(:,1:nc);
  19.